package com.yangxk.kadmin.generator.url;

import com.yangxk.kadmin.generator.template.TemplateType;
import com.yangxk.kadmin.generator.url.sub.CrudUrl;
import com.yangxk.kadmin.generator.url.sub.ReportUrl;
import com.yangxk.kadmin.generator.url.sub.TreeTableUrl;

public class RequestUrl {

    public static Url getUrl(TemplateType templateType, String modelName, String zhModelName) {
        switch (templateType) {
            case crud:
            case relate:
                return new CrudUrl(modelName, zhModelName);
            case report:
                return new ReportUrl(modelName, zhModelName);
            case treeTable:
                return new TreeTableUrl(modelName, zhModelName);
        }

        return null;
    }

}
